Coder Social home page Coder Social logo

api's Introduction

This repository contains the plugin code for the Viva Wallet plugins for Magento 2.3, OpenCart 3, PrestaShop 1.7 and WooCommerce 3.0-6.1 . For detailed instructions on the APIs and more, check out the Viva Wallet Developer Portal. You can also browse our help centre.

GitHub issues

Do you need help integrating with the Viva Wallet payment platform?

Please feel free to send us any technical queries or comments on GitHub.

For detailed instructions on the APIs and more, check out the Viva Wallet Developer Portal. You can also post an issue to be looked at by someone from our developer community.

GitHub issues

When adding a new issue for our development team to look at, please provide the following information:

  1. How are you attempting to integrate? Check first the following sections of the documentation:
  1. Please provide any request / response logs generated along with screenshots if possible. Blur out any confidential information.

If you still can't get anywhere, describe the problem as clearly as possible in a new GitHub issue, notifying us of any errors generated.

Other queries

If your issue is account related, please visit the live chat on the Viva Wallet home page.

If you have a suggestion to make, please explain it and we'll make a note to add it to our roadmap if appropriate.

Thanks

Viva Wallet Development Team

api's People

Contributors

beck2309 avatar can3ry avatar cmitsis-dev avatar ddcdom avatar dmihos avatar dpnevmatikos avatar drakakisgeo avatar gliaskos avatar hsyntyhakis avatar kostaspolymeropoulos avatar kostgx avatar makisantypas avatar matthewrgourd avatar mrpc avatar mvorisis avatar nickw444 avatar vivawalletsupport avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

Σφάλμα στο "παραγωγικό" περιβάλλον

Καλησπέρα,

Χρησιμοποιώ τον κώδικα όπως ακριβώς είναι, αλλάζοντας απλώς τις πληροφορίες μου. Στο demo περιβάλλον, όλα δουλεύουν κανονικά. Μόλις όμως αλλάξω το URL, το ID και το KEY για να χρησιμοποιήσω το παραγωγικό περιβάλλον, δε δουλεύει. Ο λογαριασμός μου είναι κανονικά ενεργοποιημένος και δέχεται πληρωμές.

Είτε φταίει με το API, είτε φταίει ο συγκεκριμένος κώδικας.

Σας ευχαριστώ εκ των πρωτέρων.

Creating "Pay with Viva Wallet" button dynamically

Hello,
We have a single-page application where the order process happens in a dynamically generated order modal. We would like to use the "Pay with Viva Wallet" button, but we cannot find how to initialize the button after the page load and with dynamically created attributes (for example the order amount is not known in the page load, its known only after the user clicks the order button and opens the modal).

I have looked into the documentation but I cannot find any methods or callbacks to do what I'm looking for. Any ideas?

Wordpress

Hi! I have purchased a wordpress template that allow payments through paypal and stripe payment systems. But I need my payment system to be Greek one (the company is located in Greece) and to have Greek checkout language. So my question is if VivaPayments system can be implemented to wordpress theme.

Προβλήματα με το API της VivaPayment

Καλησπέρα σας,

θα ήθελα να σας ενημερώσω πως χρησιμοποιώ το εν λόγω plugin - https://el.wordpress.org/plugins/woo-payment-gateway-viva-wallet/ για να συνδέσω το εταιρικό μου site με τη viva.

Έχω στείλει τα απαραίτητα έγγραφα που μου ζητήθηκαν και ο λογαριασμός που έχει ταυτοποιηθεί επιτυχώς σε όλα τα επίπεδα τα οποία ζητάει το site της Viva.

Όμως μου παρουσιάζεται ένα πρόβλημα: Όταν ο χρήστης πάει να ολοκληρώσει την αγορά του, μου πετάγεται ένα μήνυμα το οποίο λέει πως υπάρχει πρόβλημα ή με τα στοιχεία του χρήστη ή με το API. Ξέρετε για πιο λόγο συμβαίνει αυτό; Προσπαθώ εδώ και ένα μήνα να ενεργοποιήσω αυτόν τον λογαριασμό και μία τα προβλήματα του API, μία η καθυστέρηση ταυτοποίησης μας έχουν πάει πολύ πίσω.

Ευχαριστώ εκ των προτέρων!

GetTransactions API Error

Dear friends,

I have stuck for 2 days with the error on GetTransactions.

Always gives me :
[StatusId] => E
[ErrorCode] => 400
[ErrorText] => Null creditcard options on payment, order 9507169750172601.

I am trying to verify the payment for the order but with no luck !

PS: Working with the Demo API and Credit card 4111111111111111
and in the Dashboard i can see the successful payment.

Making a charge with "Pay with Viva Wallet" token results in 502 error

Hello,
I'm trying to integrate the "Pay With Viva Wallet" button. The client-side flow works correctly, but when I try to create the charge on the server using the PaymentToken I received I get the following error:

{"Emv":null,"Amount":5.35,"StatusId":"E","TransactionId":"ed087d71-7545-418e-85bc-505a92e5260c","RemainingRefunds":null,"AuthorizationId":null,"ErrorCode":502,"ErrorText":"Transaction failed","TimeStamp":"2015-09-22T21:15:31.8619764+03:00"}

Here is relevant server-side code (PHP):

$postobject=new \stdClass();
$postobject->PaymentToken=$paymentToken;
$postargs=json_encode($postobject);

// Get the curl session object
$session = curl_init('https://demo.vivapayments.com/api/transactions');

// Set the POST options.
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_POSTFIELDS, $postargs);
curl_setopt($session, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($postargs))
);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
curl_setopt($session, CURLOPT_USERPWD, $this->vivaMerchantId.':'.$this->vivaApiKey);
curl_setopt($session, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);

// Do the POST and then close the session
$response = curl_exec($session);

Any idea what is going wrong?

Capturing authorized amount

Hi guys,

I'm so sorry, I understand that this is an issue reporting tool but I could find a better way to reach technical support.

I'm creating a transaction with the option IsPreAuth=>true, through the demo admin panel, I can see that the amount has been authorized.

I read in the wiki that with the CreateRecurringTransaction i can commit an authorized transaction. But when i'm doing it I get the following error.

'Preauth e5433e3c-4719-4596-b86d-248730faf69c has expired.'

How can I capture the funds?

Thanks in advance

NativePayment API - CORS problem

Hello,
I have a problem when trying to create an order with the demo native payment api.
The problem seems to be CORS(Cross-Origin Requests)

The error message I get in the console is:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://demo.vivapayments.com/api/cards?key=XXXXX. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

I have checked the headers and it seems that my script is sending the website url as origin e.g.

Origin: http://www.example.com

But your script doesn't answer with the header needed for CORS to work e.g.

Access-Control-Allow-Origin: http://www.example.com

instead there is no header for Access-Control-Allow-Origin.

Can you please check that your script works with CORS and add the header if not.

Thanks

i got 2 websites under the same vat number

I got 2 different websites that both run cs-cart eshop, that belong to the same company
i want to connect Viva Payments to them.
should i use the same API Key and how can i understand from which website the payment came?

How can i import thi API to android studio?

I have a project about a shop and i want the payment go through viva payments but in this API folder i didn't find something for android. Is it possible to use it as it is ?

Transaction flow - process chart

Can some one on your team create a transaction flow chart...

Is Viva a Paypal like service or a real CC processor, can the service provide tokenization...

Why you do require redirect pages? or are they an option?

I have a longer list... I hope once some answers can be provided the rest can be reevaluated.

Redirect

Hello ,

When I make a payment to katsiki.gr I get correctly the redirection to viva's website. After I put the card information and complete the payment it doesn't redirect back to my website. It stays at the payment successfull page.

Viva Payments implementation to woocommerce eshop

Hi everyone,
I try to implement Viva Payments as a payment gateway into a new eshop I create for a friend. For testing purposes I also created a demo Viva Payments account but i can't find the proper sample code in order to redirect the potential customers to Viva secure page to checkout when they choose "viva" as payment method and press the "checkout" button. I have read many articles in the knowledge base and the github wiki as well. I would like to receive a more understandable reply in order to make use of the Viva Payments which i believe would enchance the overall buying experience for future customers. Thank you in advance.

401 Unauthorized

Hello guys,
Im trying to create WooCommerce payment gateway for viva payments and getting always 401 error when trying to verify the transaction within my php code, in console it works perfectly.. Also getting 401 when trying using firefox plugin.
success
fail

Any clue what's going on with this???

(sorry if posting in wrong place, but couldnt think of better one)

Recurring payments problem

According to documentation:

This API call allows you to make a new payment by either commiting an already authorized transaction or by making a recurring payment. The latter is only permitted if the following two conditions are met:
The cardholder has already been charged succesfully in the past
The cardholder has agreed on allowing recurring payments on their card

So I succefully charge a card and make it so it allows recurring payments.
Problem is that when I try to create a recurring transaction I get the following error in responce:

The specified api action is disabled for the merchant {merchant_id}, please consult the documentation

Where can I find info about it in the documentation?

I've also tried out the first option on recurring payments ,that is make a PreAuth payment, but this time when I continued on to make the recurring I always got

Preauth {transaction_id} has expired

I would appreciate any help

Angular js error

Is there any way to make the library work in angular?
I get the error "VivaPayments: Required data-vp attribute "cardnumber" was not found",
and i added the data-vp attr, i think its because of the templates...
If not, can you tell me where i can find the non uglify version of your script to make it work?
Thanks a lot.

Ελλειπή τεκμηρίωση μεθόδων πληρωμής

Αγαπητοί/ές συνεργάτες από την Viva Services,

συγχαρητήρια για την εξαιρετική τεχνική δουλειά που έχετε κάνει και ένα απίστευτο προϊόν που τόσο καιρό περιμέναμε για την Ελληνική αγορά.

Με το παρόν και κατόπιν αναλυτικής μελέτης και χρήσης του API για ενσωμάτωση Viva πληρωμών σε ιστότοπό μας, καταθέτω κάποια σχόλιά μας, σε περίπτωση που το κρίνετε χρήσιμο. Όπως και να έχει και τώρα που εξοικειωθήκαμε, σίγουρα θα το επιλέγουμε σε όλα τα επόμενα eshop μας! :-)

  1. Βρήκαμε την δυνατότητα ενσωμάτωσης πληρωμών από την σελίδα σας: https://www.vivawallet.com/el-gr/business/pay-with-vivawallet
    Στην σελίδα λέει "Ενσωματώστε τη «Πληρωμή με Viva Wallet» στην ιστοσελίδα σας εύκολα σε μία μόλις γραμμή κώδικα! ". Από αυτό θεωρήσαμε ότι θα κάναμε απλά ένα copy paste και έτσι επιλέξαμε να ασχοληθούμε με την ενσωμάτωση.

  2. Στην πράξη και πηγαίνωντας στις αναλυτικές προδιαγραφές, καταλαβαίνουμε ότι η ενσωμάτωση δεν γίνεται "εύκολα και με μια γραμμή κώδικα". Επιπρόσθετα, στην σελίδα των προδιαγραφών https://github.com/VivaPayments/API/wiki/Pay-with-Viva-Wallet, στην ενότητα "STEP 2: Make the charge", έχει ένα παράδειγμα και όχι αναλυτικές προδιαγραφές. Το παράδειγμα από μόνο του αφήνει έξω από την διαδικασία ενσωμάτωσης: α) την χρήση REST Client, β) την διαδικασία authentication, γ) την διαδικασία δημιουργίας API και Source Code, δ) την χρήση του demo environment για να γίνει testing του integration.

  3. Προσπαθώντας να βρούμε -δομημένη- πληροφορία και end-to-end οδηγίες, καλέσαμε το τεχνικό support. Αναφέραμε ότι ζητάμε ολοκληρωμένες οδηγίες για την εγκατάσταση και μας δώσανε εξειδικευμένο αριθμό Viva Support που ασχολείται μόνο με αυτά τα θέματα. Καλέσαμε εκεί και μας είπανε ότι η Viva δεν παρέχει καμία υποστήριξη σε τέτοια θέματα και ότι δεν έχει ολοκληρωμένο οδηγό. Μας συμβούλεψε να πάμε στο GitHub page και να ανοίξουμε αίτημα τεχνικής υποστήριξης από την ειδική φόρμα. Ρωτήσαμε τι σημαίνει "αίτημα τεχνικής υποστήριξης από την ειδική φόρμα" και μας ενημερώσανε ότι εννούν να ανοίξουμε ένα GitHub issue. Ρωτήσαμε αν υπάρχει προσωπικό που ασχολείται με τα issues και εξυπηρετεί το κοινό και μας είπαν ότι εξαρτάται γιατί η Viva δεν παρέχει υποστήριξη σε τέτοια θέματα.

  4. Επιστρέψαμε στην αρχική σελίδα του GitHub αυτή την φορά και διαβάσαμε αναλυτικά τα πάντα. Βρήκαμε κάποιες αναφορές σε authentication οδηγίες που όμως δεν καθορίζαν λεπτομέρειες στα headers των API calls, ούτε και σημαντικά πεδία όπως το Source Code.

  5. Προσπαθήσαμε να βγάλουμε άκρη με τα παραδείγματα κώδικα. Δυστυχώς δεν υπήρχε παράδειγμα για Viva Wallet Payment μέθοδο. Με κόπο και διασταυρώνοντας την λογική διαφόρων σελιδών, διαπιστώσαμε ότι ο φάκελος με τίτλο "Create order", αφορούσε την μέθοδο πληρωμής "Redirection". Επίσης με κόπο και πολύ πειραματισμό συμπεράναμε ότι το "create order" sample code, δεν ήταν απλά ένα συγκεκριμένο function του API, αλλά παρείχε ολοκληρωμένο παράδειγμα προς χρήση, για την μέθοδο πληρωμής "Redirection".

Συνοψίζοντας:

  • Το μέσο web agency με μέση γνώση χρήσης RESTAPIs που θέλει να ενσωματώσει την πληρωμή "Viva Wallet Payments" για έναν πελάτη τους, πληροφορείται αυτή την στιγμή από τον εμπορικό ιστότοπο της Viva ότι είναι μια γρήγορη και εύκολη διαδικασία, που απαιτεί απλά copy-paste μια γραμμή κώδικα, κάτι το οποιό δεν ισχύει. Χρειάζεται αναλυτικό διάβασμα, πειραματισμό και αρκετές γραμμές κώδικα που πρέπει να γράψει.
  • Οι αναλυτικές προδιαγραφές που παραπέμπει το εμπορικό site, δεν είναι αναλυτικές. Απεναντίας οι προδιαγραφές είναι γενικές συνόψεις που δεν συνδέονται μεταξύ τους και δεν δείχνουν όλα τα βήματα, δομημένα και οργανωμένα. Ο αναγνώστης πρέπει να κάνει cross-reference και ανακαλύψει όλες τις λεπτομέρειες που χρειάζεται (να πάρει API authentication sample από τα samples, να καταλάβει ότι πρέπει να στήσει Source Code, να καταλάβει ότι πρέπει να στήσει demo account, κτλ )
  • Στα δείγματα κώδικα, δεν μπορεί να καταλάβει κανείς που υπάρχει κώδικας για "Redirection" μέθοδο και "Viva Wallet Payments" μέθοδο.
  • Από τις 4 ώρες που θα χρειαστεί να επικοινωνήσει με την Viva, να διαβάσει αναλυτικά, να πειραματιστεί και να πετύχει το integration, οι 3,5 ώρες είναι για να συνδέσει τα "dots".

Ελπίζω το παρόν issue, να φανεί χρήσιμο.
Με συγχωρείτε εκ των προτέρων, αν τελικά έχω κάνει κάποιο σφάλμα και υπάρχει όντως αναλυτικός και δομημένος οδηγός για κάθε περίπτωση, ή εάν η Viva δηλώνει κάπου στην διαφήμιση της υπηρεσίας ότι οι developers θα πρέπει να μελετήσουν γιατί δεν προσφέρεται support σε τέτοια ζητήματα.

UPDATE/EDIT
Παρέλειψα και διάφορες λεπτομέρειες που θα ήταν χρήσιμες όπως:

  • H μέθοδος "Native Checkout" απαιτεί SSL και HTTPS, κάτι που δεν αναφέρεται πουθενά και προκύπτει στην πράξη. Λογικό φυσικά που χρειάζεται..
  • Η μέθοδος "Redirection" επιστρέφει στα "success" και "failure" pages δεδομένα μέσω GET μεταβλητών, ενώ τα περισσότερα payment gateways (πχ των τραπεζών) δουλεύουν με POST. Οι περισσότερες πλατφόρμες με e-shop (magento, woocommerce, κτλ), κατά 90% βγάζουν error σε αυτή την περίπτωση γιατί έχουν SEF URLs που απορίπτουν URL query μεταβλητές.
    Αν η Viva κάνει tracking του customer feedback μπορούμε να σας γράψουμε αναλυτικά.

Οι πληρωμές ξαφνικά σταματησαν να λειτουργουν, αλλαξε το URL χωρίς να το πειράξουμε

Καλησπέρα,

Ενω όλα δουλεύαν σωστά εδώ και 2 χρόνια...
Εδώ και κάποιες ημέρρες, οταν κάποιος παει να κανει μια πληρωμη Live τον σταματάει επιτόπου στο δευτερο βήμα με μηνυμα "Η συναλλαγή σας απέτυχε." μιλησα με κάποια κυριά και μου είπε οτι τα Settings στις πηγες δεν ηταν σώστα. Ειμαστε 100% σιγουροι οτι κανένας δε πείραξε τα Settings παρολα αυτά το URL www.vivapayments.com !!! Φαινετε οτι κάποιος άλλος εκτός του account μας τα πείραξε ή έγινε κάποιο Crash στην εφαρμογή σας?

Αλλάζοντας πάλι τα Settings στο σωστό URL εξακολουθούμε να λαμβάνουμε το ίδιο μήνυμα οταν κάνουμε μια Live πληρωμή.

Υπάρχει κάποιος private τρόπος επικοινωνίας για να μην εκθέτουμε τα Links και τα Merchant ids στο Public Forum?

Ευχαριστώ

Wiki typo??

In this paragraph:

http://demo.vivapayments.com - The demo work environment can be used for all your development/demonstration requirements. No actual payments or emails are made or sent from this environment. A successful transaction can be simulated with the card number 4111 1111 1111 1111 with any valid date and 111 for the CVV2. All other card numbers will result in a failed transaction. You can create demo accounts from here, all that is required is a valid email address.

Email address is not requested when registering for demo account.

Datetime conversion in python wrapper

The current python implementation fails to convert the returned ISO-formatted timestamp to a datetime object if the characters representing seconds are less than 10.

For example, I have seen both
2014-08-15T15:39:55.461264+03:00 and
2014-08-15T15:39:55.5706103+03:00 returned by the REST API as TimeStamp in actual calls.
In the former case the parser fails since it tries to convert 55.461264+ to float.

The obvious solution is to replace
L83: time_tokens = timestamp[11:27].split(':') with
L83: time_tokens = timestamp[11:26].split(':') so that only the first 9 digits of seconds are parsed (or maybe even less).

However, I strongly recommend using a library such as dateutil to do this kind of work. It will add a dependency, but a pretty common one. Dateutil will also add timezone information, which is currently missing.

As a side note, I'd like to see other datetime objects returned by the REST API (such as InsDate returned by get_transaction) converted too, currently the wrapper only deals with TimeStamp.

If needed, I could create a pull request for this issue.

Payment with Redirection

I use woocommerce with wordpress and i installed the plugin. I tried to make a payment as a test payment but the transaction failed. What can i do? can someone help me?

DisableCash option in the demo environment

Hello, It seems I'm not able to get the DisableCash option (documented here) working for new orders in the demo environment. It's weird, because all other options I tried so far seem to be ok, so probably it's just a demo environment configuration issue.

Can you please verify that DisableCash is intended for hiding the phone/cash payment options in the payment form and that it works as expected in the demo environment? When setting the option to true, I still can see the 'IVR' tab to the bottom of the page.

Redirect Payment μέσω Viva

Καλησπέρα σας,

θα ήθελα να συνδέσω τον ιστότοπο μου (esolutionpro.gr), μέσω του Viva με τη Redirect Payment method, έτσι ώστε, όταν ένας πελάτης ολοκληρώσει την αγορά του στον ιστότοπο μου να ανακατευθύνεται στον ιστότοπο της Viva προκειμένου να κάνει την πληρωμή. Για να το κάνω αυτό πρέπει να χρησιμοποιήσω τον κώδικα PHP που δίνεται στο github, όσον αφορά το Redirect Checkout (1. Payment Order, 2. Completion of the payment details, 3. Confirmation of the transaction), η μπορεί να γίνει πιο απλά; Κι αν πρέπει να το κάνω με χρήση PHP, υπάρχει κάποιος οδηγός στο github;

Ευχαριστώ εκ των προτέρων!

GetTransactions call

Γεια σας
Θα ήθελα να με πληροφορήσετε για τα παρακάτω
Έχω δημιουργήσει την γέφυρα πληρωμής bankvivaform.asp η οποία στέλνει τα στοιχεία στην σελίδα πληρωμής του συστήματος σας.
Η μέθοδος είναι Redirect Checkout και o προγραμματισμός σε γλώσσα asp
Η δημιουργία Creation of the Payment Order είναι σωστή χωρίς προβλήματα

Το πρόβλημα που έχω είναι στην σελίδα επιστροφής επιτυχής συναλλαγής (http://www.euroalarm.2easy.gr/bp/bankViva_ok.asp )

Τα στοιχεία επιστροφής μιας επιτυχής συναλλαγής είναι

http://www.euroalarm.2easy.gr/bp/bankViva_ok.asp?t=39a3eea8-d1c4-41e0-b7a5-bb9c617840f5&s=7531882921572608&lang=el-GR

Σύμφωνα με τις οδηγίες σας συνιστάτε να κάνουμε και μια ερώτηση επιβεβαίωσης της συναλλαγής σύμφωνα (You can make a GetTransactions call to verify the status of an Order. )

Παίρνω τα στοιχεία επιστροφής παρακάτω

            OrderCode = request.querystring("s")
            strTransactionID = request.querystring("t")
            strLang = request.querystring("Lang") 

ordercode=7531882921572608 strTransactionID=39a3eea8-d1c4-41e0-b7a5-bb9c617840f5

Τα στοιχεία MerchanID APIkey και url είναι

MerchanID=f9f3f5f4-f222-48c9-be5a-ea6ae727e88a
APIkey=;d]z7:
url=http://demo.vivapayments.com/api/transactions/?

GetTransactions call

strVivaUrlGetTransaction = "http://demo.vivapayments.com/api/transactions/?"
strMerchanID = f9f3f5f4-f222-48c9-be5a-ea6ae727e88a
strAPIKey = =;d]z7:

Set http = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
http.open "GET", strVivaUrlGetTransaction, False', strMerchanID, strAPIKey '
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.setRequestHeader "Authorization", "Basic "&Base64Encode(strMerchanID&":"&strAPIKey)

http.send("ordercode=" & OrderCode )

response.write http.responsetext

η απάντηση που παίρνω είναι
{"Transactions":[],"ErrorCode":400,"ErrorText":"Empty options","TimeStamp":"2016-02-09T09:54:33.0584711+02:00"}

1)Παρακαλώ ενημερώστε μου που είναι το λάθος η το πρόβλημα.
Είναι λάθος η διεύθυνση strVivaUrlGetTransaction ? η κάτι άλλο.
Όσο και να έψαξα στα παράδειγματα σας δεν βρήκα πουθενά παραδείγματα χρήσης των εντολών GetTransactions (https://github.com/VivaPayments/API/wiki/GetTransactions )

  1. Πότε ενεργοποιείτε η σελίδα μη επιτυχής συναλλαγής ? Πότε επιστρέφει το σύστημα σας σε αυτή την σελίδα ?
    Στην σελίδα πληρωμής δεν υπάρχει κάποιο κουμπί ακύρωσης της διαδικασίας πληρωμής. Ο μόνος τρόπος είναι να κλείσει κάποιος την σελίδα ή από το κουμπί επιστροφής στην προηγούμενη σελίδας ( πίσω δηλαδή ), αλλά σε καμία από αυτές τις περίπτωσης δεν ενεργοποιείτε η σελίδα επιστροφής μη επιτυχής συναλλαγής

Σας ευχαριστώ για τον χρόνο σας
Περιμένω τις οδηγίες σας

Με εκτίμηση
Βαγγέλης Κολοκοτρώνης

Εάν δεν υπάρχει OpenSSL στον server

Επειδή ο κώδικας και τα παραδείγματα που αναφέρετε δεν είναι για όλα τα configurations παρακαλώ να προστεθεί ότι εάν ο server δεν έχει OpenSSL (όλοι οι servers της TopHost καθώς και άλλων εταιριών στον Ελληνικό χώρο) και έχει NSS,

η γραμμή:
curl_setopt($session, CURLOPT_SSL_CIPHER_LIST,'TLSv1');

πρέπει να αντικατασταθεί με το:
define('CURL_SSLVERSION_TLSv1', 1);
curl_setopt( $session, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);

Σας ευχαριστώ.

Tags on Optional Parameters

According to the documentation, one can add several tags by passing tags as an array of strings. Unfortunately, no tags are shown in the administrative area.

Bug or incomplete documentation?

redirection

Καλημέρα,

Η ανακατεύθυνση στο κουμπί πώλησης δεν λειτουργει, παρόλο που έχει εγκριθεί η ανακατεύθυνση στο site μας. (Υπάρχει ακόμα η ειδοποιηση που λέει οτι χρειάζεται έγκριση) Η δοκιμές που κάναμε ανακατευθύνουν πάλι σε εσάς

Μπορείτε να το δείτε

ΑΦΜ: 997399330

Currency Code

WE are having issue with multi currency , we have included in our request parameters args for USD currency but it still display amount in Euros

$currenctyType = '840'; 
$postargs = 'Amount='.urlencode($Amount).'&AllowRecurring='.$AllowRecurring.'&RequestLang='.$RequestLang.'&SourceCode='.$Source.'&CurrencyCode='.$currenctyType;

Kindly can you help?
Thanks

Cancel recurring payments

Hi everyone

Can I somehow stop recurring payments from a card via the api ,or only the card owner can do that?
I mean that when I create a recurring payment (and the payer agrees of course), I can infinitely make new payments, as long as the amount paid each time is equal or lower than the first recurring payment.
If some buyer wishes to unsubscribe from recurring payments, or in a scenario that wants to change his card, is there a way to stop recurring payments from certain TransactionId?

I've tried cancelling the first transaction made (the one that the buyer has to agree on recurring) ,refunding the full amount, but this only returns the original amount back to buyer, without preventing further payments to be made for the same order id.
I've also tried to cancel the order but that changed nothing as well.

P.S. In demo dashboard ,notifications screen , is there a way to display notifications of past days? I only seem to be able to view today's notifications and the datepicker, or the checkboxes don't seem to change the results. Was there supposed to be a submit button or am I just not seeing it the whole time?

demo.vivapayments.com certificate chain issue

Check the report here:
https://www.ssllabs.com/ssltest/analyze.html?d=demo.vivapayments.com

$ curl https://demo.vivapayments.com/

curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

CURLOPT_SSL_CIPHER_LIST on PHP must be commented for production calls

On the PHP sample of create_order.php, the curl command CURLOPT_SSL_CIPHER_LIST must be commented out in order for the API call to work. Any other value to the command such as RC4-SHA, will not work at all.
I have submitted the commented code line to my respective fork. (candreikos/API)

Server Error in '/Web' Application.

Since this morning when I try out an order payment in the new demo dashboard , I fill the fields correctly and when I hit the charge[amount] button I'm redirected to
http://demo.vivapayments.com/Web/checkout/checkout
showing "Server Error in '/Web' Application."

Server Error in '/Web' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

If I hit cancel I'm redirected normally to my fail url as expected

Empty json response

Καλημέρα σας

προσπαθώ να συνδέσω το site http://agrotikes-eykairies.gr/online-registration

με το vivapayments api

Χρησιμοποιώ την παρακάτω εγκεκριμένη πηγή πληρωμών

Κωδικός Περιγραφή Τύπος Συνδεδεμένο Wallet Κατάσταση Λειτουργία Επιλογές
4871 agrotikes-eykairies Ιστοσελίδα Primary Ενεργή
Διαγραφή

Οταν χρησιμοποιούσα τα demo στοιχεία όλα λειτουργούσαν κανονικά. Όταν χρησιμοποίησα τα κανονικά στοιχεία της πηγής πληρωμών, δεν κάνει Parse το JSON response

όταν κάνω print_r το $resBody μου βγάζει λευκή σελίδα, όταν χρησιμοποιώ τα demo στοιχεία μου κάνει κανονικά print_r το json object.

Μπορείτε παρακάλω να με βοηθήσετε ?

Χρησιμοποιώ τον παρακάτω κώδικα

`$request = 'https://www.vivapayments.com/api/orders';

$MerchantId = 'ac850453-3820-4535-81c9-3ec502d1fb84';
$APIKey = 'AGRO1';
$CustomerTrns = $data['seminar'];
$MerchantTrns = $data['name'];
$Email = $data['email'];

//Set the Payment Amount
$Amount = $data['totalamount'] * 100 ; // Amount in cents
$AllowRecurring = 'false';
$RequestLang = 'el-GR';
$Source = '4871';
$postargs = 'Amount='.urlencode($Amount).'&AllowRecurring='.$AllowRecurring.'&RequestLang='.$RequestLang.
'&CustomerTrns='.$CustomerTrns.'&MerchantTrns='.$MerchantTrns.'&Email='.$Email.'&SourceCode='.$Source;
// Get the curl session object
$session = curl_init($request);
// Set the POST options.
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_POSTFIELDS, $postargs);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
curl_setopt($session, CURLOPT_USERPWD, $MerchantId.':'.$APIKey);
curl_setopt($session, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
// Do the POST and then close the session
$response = curl_exec($session);
// Separate Header from Body
$header_len = curl_getinfo($session, CURLINFO_HEADER_SIZE);
$resHeader = substr($response, 0, $header_len);
$resBody = substr($response, $header_len);
curl_close($session);
// Parse the JSON response
try {
if(is_object(json_decode($resBody))){
$resultObj=json_decode($resBody);
}else{
preg_match('#^HTTP/1.(?:0|1) [\d]{3} (.*)$#m', $resHeader, $match);
throw new Exception("API Call failed! The error was: ".trim($match[1]));
}
} catch( Exception $e ) {
echo $e->getMessage();
}
if ($resultObj->ErrorCode==0){ //success when ErrorCode = 0
$orderId = $resultObj->OrderCode;

 $data['url'] = "https://vivapayments.com/web/newtransaction.aspx?ref=$orderId";

}

else{
echo 'The following error occured: ' . $resultObj->ErrorText;
}`

Μπορείτε παρακαλώ να με βοηθήσετε?

OrderCode returns as a float on 32bit php

Because of the fact that the OrderCode is now a 64 big integer, when I am json decoding the response of vivapayments on a 32bit system, it shows up as a float. Is it possible for you to return the code as a string and not as an integer, so 32bit systems can parse it?

API Call Failed

Καλησπέρα σας, έχω ενσωματώσει τον κώδικα για create order αλλάζοντας τα στοιχεία που πρέπει στα δικά μου και μετέπειτα σε demo αλλά και σε live περιβάλλον μου εμφανίζει Api call failed. Τι λάθος μπορεί να έχει γίνει. Σας ευχαριστώ εκ των πρωτέρων

Notify when doing CRITICAL changes!

Please, please, please, when doing critical changes (such as the change on Redirection URL) find a way to inform your customers.

What kind of logic is to do such a MASSIVE change without informing your users about that? I am not even talking about informing your customers some days before...

Are you serious???
Is it that hard???
Other companies DO NOT EVEN breaking their API's/Endpoints without valid arguments and good preparations for God's sake!!!

And YES i am watching this repository on github...

Token expiration time

The Token seems to expire quickly after its creation.
Is there a way to extend the token period of expiration?
Otherwise what is the purpose of creating the token?
If I can't store the token and use it again for new payments, so that the user will not have to enter his card details again?

Non reversible transaction

Hi everyone

Every request made with DELETE to "api/transactions/{tid}"
or "api/transactions/{tid}?amount={any_amount_smaller_than_transaction's_amount}" responds with

{
"StatusId":"E",
"TransactionId":null,
"RemainingRefunds":null,
"ErrorCode":403,
"ErrorText":"Non reversible transaction",
"TimeStamp":"2014-02-12T16:51:15.6069184+02:00"
}

I have enabled cancel and refunds on demo security dashboard, though this problem still remains.

Any tips?

ecommerce plugin - need some help developing

hi i'm trying to create a plugin for an ecommerce site and based on all your code samples, it seems incomplete...

basically i want to submit the payment amount to vivawallet and i even tried using your button (which has an error on your public site, missing a " for action) and it's just not going through - also i'm not receiving a redirect... or response action...

do you have any complete code that we can actually work with or is it just these bits and pieces?

where are the complete variables list that are passed onto viva and returned (POST/GET)?

any help greatly appreciated

i'm using oscommerce 2.1.0.1 - so i just need php coding - just want to pass the info at checkout into the vivapayment button so it pops up to pay, then once complete, to close the button popup and finish the process on my site for successful checkout and confirmation...

Change default source problem

I canged the source of payment from default to a payment source with code 2356. I change it to my code in my php checkout page it redirects me right but when I finish the transaction seems to go to the not ok page of default source of payment. The website is thefashionproject.gr can any technitian check it in order to solve the problem?

Thank you

Basic auth with & in APIkey

Hi,
it seems to be a problem when a & is present in the APIKey.
Basic authorization fails for the php code.
Is there a fix?
curl_setopt($session, CURLOPT_USERPWD, $MerchantId.':'.$APIKey);

Πρόβλημα σχετικά με το Mobile API

Καλησπέρα,

Έχω υλοποιήσει ένα package για το Laravel framework το οποίο καλύπτει τις περισσότερες λειτουργίες που προσφέρει το VivaPayments API σύμφωνα με το wiki.

https://github.com/sebdesign/laravel-viva-payments

Έχω γράψει μια σειρά από functional tests τα οποία χτυπάνε το API στο demo environment, με τα κατάλληλα credentials: API key, Merchant ID, Public Key.

Επίσης έχω φτιάξει ένα source (code 4693) το οποίο προορίζεται native χρήση:

Protocol: https
Όνομα domain: demo.vivapayments.com
Integration method: Native/Πληρωμή με Viva Wallet Checkout
URL Επιτυχημένης συναλλαγής: web/checkout/result
URL Αποτυχημένης συναλλαγής: web/checkout/result

Ακολουθώντας τις οδηγίες του Mobile API
παίρνω με επιτυχία το OrderCode, το Token, και τα MaxInstallments.

Όταν κάνω POST /api/Transactions μου επιστρέφει ένα μήνυμα με ErrorCode 403 και ErrorText Invalid input.

Το συγκεκριμένο test είναι αυτό: tests/functional/TransactionFunctionalTest.php.

Τι μπορεί να κάνω λάθος;

Αν προσθέσετε ένα αρχείο .env με τη μορφή του .env.example και τα σωστά credentials, και βάλετε το κατάλληλο source αντί για 4693, μπορείτε να το εκτελέσετε για να δείτε το αποτέλεσμα.

Ευχαριστώ!

Android basic authorization

Hi,

I would like to know in which link i have to send my requests so i can achieve a basic auth.
Also,the api have a specific format for the authorization for example i have to use JSON or i can use base 64 encode ?

Thanks in advance

GetTransactions call more

Καλημέρα
Σε συνέχεια προηγούμενου post που έχει κλείσει

  1. Ερώτηση
    Για κάθε μια επιτυχημένη πληρωμή το σύστημα σας επιστρέφει στην σελίδα που έχουμε δηλώσει ( σελίδα επιτυχημένης συναλλαγής ) . Υπάρχει κάποια περίπτωση που το σύστημα σας επιστρέφει στην σελίδα επιτυχημένης συναλλαγής χωρίς η συναλλαγή να είναι επιτυχημένη = έχει γίνει η χρέωση ?

Όσο αφορά την επιλογή Ακύρωσης της πληρωμής είναι μια πρόταση που θα μπορούσε να κάνει το σύστημα σας ποιο φιλικό και σωστό. Θα μπορούσατε να το προωθήσετε σαν ιδέα στο αντίστοιχο τμήμα που ασχολείται με την υλοποίησης του συστήματος σας.

  1. Η απάντηση λάθους ErrorCode":400, μπορείτε να μου πείτε τι σημαίνει ?
  2. Έχετε κάποια παράδειγμα κλήσης GetTransactions call σε κάποια γλώσσα προγραμματισμού ? Θα με βοηθούσατε εάν είχατε ένα παράδειγμα σε γλώσσα classic asp. Στο github δεν υπάρχουν παραδείγματα GetTransactions η τουλάχιστον εγώ δεν έχω βρει κάτι.

Σας επισυνάπτω τον κώδικα της σελίδας επιτυχημένης πληρωμής /bp/bankViva_ok.asp

Και όπως έρχεται από το σύστημα σας η επιστροφή στην σελίδα επιτυχημένης πληρωμής

http://www.euroalarm.2easy.gr/bp/bankViva_ok.asp?t=87b27951-12f5-4253-bdff-4e43ee7b9bf3&s=8243103019172607&lang=el-GR

bankViva_ok.asp

<%if sxNobody then%>

<%end if
openConn

function NzInt(int)
NzInt = int
if isNull(int) OR isEmpty(int) OR lenb(int) = 0 OR Not isNumeric(int) then
NzInt = 0
end if
end function

Dim radioContinue
radioContinue = True
Dim radioVivaReturn
radioVivaReturn = True

Dim OrderCode, strTransactionID, strLang
OrderCode = request.querystring("s")
strTransactionID = request.querystring("t")
strLang = request.querystring("Lang")

if OrderCode = "" then radioVivaReturn = False
if radioVivaReturn then
if radioContinue then
sql = "SELECT * FROM PB_Viva WHERE InUse = True "
set rs = conn.execute(sql)
if not rs.eof then
strMerchanID = rs("MerchanID")
strAPIKey = rs("APIKey")
strPublicKey = rs("PublicKey")

strVivaUrltTansaction = rs("VivaUrlTransaction")
strVivaUrlGetTransaction = rs("VivaUrlGetTransaction")
radioContinue = True
else
radioContinue = False
end if
rs.close
set rs = nothing
end if

if radioContinue then
Set http = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
http.open "GET", strVivaUrlGetTransaction, False', strMerchanID, strAPIKey
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.setRequestHeader "Authorization", "Basic "&Base64Encode(strMerchanID&":"&strAPIKey)
response.write "ordercode=" & ordercode & " strTransactionID=" & strTransactionID & " MerchanID=" & strMerchanID &" APIkey=" & strAPIKey & " url=" & strVivaUrlGetTransaction &"
"
http.send("ordercode=" & OrderCode )
response.write http.responsetext
Response.End

end if
%>

και η απάντηση που παίρνω είναι
α) τα στοιχεία που χρησιμοποιώ είναι τα παρακάτω για την κλήση

response.write "ordercode=" & ordercode & " strTransactionID=" & strTransactionID & " MerchanID=" & strMerchanID &" APIkey=" & strAPIKey & " url=" & strVivaUrlGetTransaction &"
"

ordercode=8243103019172607
strTransactionID=87b27951-12f5-4253-bdff-4e43ee7b9bf3 MerchanID=f9f3f5f4-f222-48c9-be5a-ea6ae727e88a
APIkey=;d]z7:
url=http://demo.vivapayments.com/api/transactions/?

response.write http.responsetext

{"Transactions":[],"ErrorCode":400,"ErrorText":"Empty options","TimeStamp":"2016-02-10T10:49:03.228726+02:00"}

Αυτό που υποψιάζομαι ότι είναι το λάθος είναι ότι η τιμή που στέλνετε στο σύστημα σας με την εντολή http.send("ordercode=" & OrderCode ) Το OrderCode έρχεται σαν sting και φυσικά στέλνετε σαν sting ενώ εσείς το εξετάζετε σαν Int64. H μετατροπή του με την εντολή CDbl OrderCode = CDbl(OrderCode) το αλλάζει από 8243103019172607 σε 8.24310301917261E+15 η εντολή OrderCode = Cint(OrderCode) κάνει Overflow: 'cInt' Δεν έχω βρει τρόπο να μετατρέψω το string σε int64 μήπως ξέρετε εσείς κάποιο τρόπο ?

Πραγματικά δουλεύει η επιλογή GetTransactions call στο σύστημα σας ? Είναι κάποια εφαρμογή που την χρησιμοποιεί ?

Εάν δεν μπορείτε να με πληροφορήσετε εσείς ίσως υπάρχει κάποιος άλλος στο τεχνικό τμήμα που ίσως θα μπορούσε ? ή μήπως θα πρέπει να απευθυνθώ στον υπεύθυνο του τεχνικού τμήματος της vivawallet.

Ευχαριστώ

Πρόβλημα με το Public Key στο www.papnet.gr - Error: Status Code: 404 Account token was not found for key 6ptCfMHVzSv0oz09xZwt0aLUschKTHRvxhHlb6EEqCo=

Καλησπέρα σας,

Έχουμε φτιάξει ένα ηλεκτρονικό κατάστημα σε OpenCart (ver.2.1.0.1) - (www.papnet.gr) και αγοράσαμε επίσης και ένα plugin το οποίο επιτρέπει την πληρωμή μέσω VIVA (υποστηρίζει redirect & native).

Εγκαταστήσαμε και ρυθμίσαμε με την βοήθεια του Author το συγκεκριμένο plugin και ενώ φαίνεται να λειτουργεί κανονικά (σε redirect σύμφωνα με τον author που το δοκίμασε), όταν το ρυθμίζουμε να λειτουργήσει ως Native, κατά την διαδικασία αγοράς και στο τελευταίο βήμα εισαγωγής στοιχείων της κάρτας, εμφανίζει στο Network Reporter του browser (πχ firefox) το παρακάτω error:

Status Code: 404 Account token was not found for key 6ptCfMHVzSv0oz09xZwt0aLUschKTHRvxhHlb6EEqCo=
*Σας επισυνάπτουμε και το σχετικό printscreen.
public_key-error

Όλες οι ρυθμίσεις στο plugin (μέσα στο Open Cart) καθώς και στο account του πελάτη στην VIVA, έχουν πραγματοποιηθεί σωστά (σύμφωνα πάντα με τις οδηγίες του author και της VIVA αντίστοιχα).
*Σας επισυνάπτουμε και τα σχετικά printscreens.
printscreen-opencart
printscreen-viva_account

Στο τελευταίο μήνυμά του ο author του plugin, μας διαβεβαιώνει ότι το plugin του λειτουργεί άψογα και ότι ο server της VIVA απορρίπτει το Public Key ή ότι το Public Key είναι λανθασμένο.

Παρακαλούμε πολύ για την άμεση εξυπηρέτησή σας και επίλυση του συγκεκριμένου ζητήματος, ώστε να εξυπηρετηθεί άμεσα και ουσιαστικά ο πελάτης.

Σας ευχαριστούμε εκ των προτέρων.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.