Giter VIP home page Giter VIP logo

youcan-payment-php-sdk's People

Contributors

5baddi avatar an1bra avatar ayoubezzini avatar azuradara avatar inakkar avatar whyounes avatar y-abderrazik 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youcan-payment-php-sdk's Issues

"Listener already attached for window" error when trying to re-submit the form

Hi,

[Sandbox mode] When I submit the form for the first time after reloading the page, it works as normal. However, if the form has an error (e.g. an invalid card expiration date), and I correct the error and try to resubmit the form, I get an error saying 'listener already attached for window undefined'

Please see the video below
https://drive.google.com/file/d/1oMB__ZCCT4diG6K-5qbbPvgAhO-9X4Cn/view

I used the exact code from the documentation ( Replace the Sandbox public key and transaction Token )
https://youcanpay.com/docs#testing_and_test_cards

Did I miss anything, or is there an issue with the ycpay.js file?

Account not found

I got {"success":false,"message":"account not found"} every time I use sandbox private key to generate a token at endpoint https://youcanpay.com/api/tokenize.

success_url never gets hit in LIVE mode, works fine in SANDBOX mode

Hi, i am using the Standalone Integration, the library works fine in the sandbox mode but the issue is that when i switch to live mode it never hits the success_url after payment. after the 3DS verification and the payment is done, the payment page gets automatically closed without hitting the success_url.

trying to add youcan payment to my personal site

why i don't get any response this the code :

useKeys('pri_9fb67306-af64-449f-bacf-18a556f3', 'pub_a01b7b41-0e42-4a56-a165-1bc55244'); // Data of the customer who wishes to make this purchase. // Please keep these keys. $customerInfo = [ 'name' => '', 'address' => '', 'zip_code' => '', 'city' => '', 'state' => '', 'country_code' => '', 'phone' => '', 'email' => '', ]; $metadata = [ // Can you insert what you want here... //'key' => 'value' ]; $token = $youCanPay->token->create( "order-id", "1000", "USD", "123.123.123.123", "https://yourdomain.com/orders-status/success", "https://yourdomain.com/orders-status/error", $customerInfo, $metadata ); return $token->getId(); } } ?>
<script type="text/javascript">
    // Create a YouCan Pay instance.
    const ycPay = new YCPay(
        "pub_a01b7b41-0e42-4a56-a165-1bc55244", {
            formContainer: "#payment-card",
            locale: "en",
            isSandbox: true,
            errorContainer: "#error-container",
        }
    );

    ycPay.renderCreditCardForm();
</script>
<script type="text/javascript">
    document.getElementById("pay").addEventListener("click", function() {
        // Execute the payment, it is required to put the created token in the tokenization step.
        ycPay
            .pay("<?php (new ExamplePayment())->createToken() ?>")
            .then(successCallback)
            .catch(errorCallback);
    });

    function successCallback(transactionId) {
        alert("success");
    }

    function errorCallback(errorMessage) {
        alert("faild");
    }
</script>

Flutter support

Can the sdk be integrated in flutter in any possible way ? (Http requests maybe ?)

integration on shopify

Hello, can anyone help me integrate YOUCANPAY on shopify, i have low knowldge in coding ... when m trying to insert the php code i couldnt edit checkout page source code on shopify.
Thank you

Is there any way to manage subscriptions

Hello YouCanPay team, I'm Hamza from Morocco I have a website based on subscriptions, to access premium content you need to pay 9$ per month
Does YouCanPay support subscriptions ?

Internal server (status code 500), even the sandbox payment transaction do proceed successfully

How to reproduce:

I make the payment over the Rest API with the INSOMNIA client so it's clear, first I send this request:
image

then I take that token.id and execute a payment with a test card:
image

as you see the response is a 500 internal server error, but in my dashboard, it shows that the operation did been executed successfully:
image
image

as you see the id of the order is 105 same as what I did tokenize, but it just returns a 500 server error.

I see that there is many SDK for YouCan pay in android, ios, and flutter ( which I was trying so it leads me to point the problem ) and they will be affected since it relies on HTTP requests.

I'm testing with the sandbox api endpoint : https://youcanpay.com/sandbox/api/pay

Linking YoucanPay with Shopify

Hello Guys,
I was wondering if u can link the YCP API with a shopify store or any other store ?
Thanks in advance guys

Not supported status code from the server.

When i try to generate $token->getPaymentURL() , i got this error "Not supported status code from the server."
Here is my code :
//set the paramagers of youcanpay :

YouCanPay::setIsSandboxMode(true);
$youCanPay = YouCanPay::instance()->useKeys(
"pri_e6bcdcfd-ac32-48f5-b3fd-537432a2","pub_2fca06a4-907f-4787-b4e9-6f10e0b7"
);
$token = $youCanPay->token->create(
47586,
2000,
"USD",
"123.123.123.123",
"https://gymanager.club/",
"https://gymanager.club/",
);
return $token->getPaymentURL(
// lang: Support 3 languages: AR, EN and FR.
'EN'
);

error when i use sandbox mode

During rendering credit card form in sandbox mode i get this error message :Cannot read properties of undefined (reading 'payments_active').
I made live transaction by my credit card in the live mode it works fine
note: sandbox mode activated in youcan dashboard, i use public sandbox key for frontend code, public and private sandbox key for backend.

const ycPay = new YCPay('pub_sandbox_xxxxxxx',
{
isSandbox:true,
formContainer: '#payment-container',
locale: 'en',
errorContainer: '#error-container'
});
ycPay.renderCreditCardForm();
</script>

Verify Transaction

After payment has been completed and the user is redirected back to either the success or error URL on the merchant website with the transaction ID and other info about the transaction. This response is sent via a get request. Is there a way to verify that the reponse sent to the callback URL is coming from YouCan Pay servers??

Is there an API endpoint for independently verifying if a transaction is successful or vice versa?

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.