paypal / PayPal-PHP-SDK

PHP SDK for PayPal RESTful APIs
https://developer.paypal.com/docs/api/
Other
25 stars 98 forks source link

Transaction is being placed but without any deduction of money. #472

Closed umarmughal824 closed 8 years ago

umarmughal824 commented 8 years ago

I have been using with laravel 4.2. I tried to get its solution from this website. http://learninglaravel.net/integrate-paypal-sdk-into-laravel-4-laravel-5/link I wrote the code as it is. But I got shocked its showing transaction but without any charging or deduction. After transaction my balance remains same even though by any way of paying.

By the way, I'm using 'paypal' as payment method. When I go to pay for it. It charges nothing even though have some positive values in cart. In my developer account in transaction. I see that fields only.

HTTP Status URL PayPal Debug ID Transaction Date

No transaction amount included in it.

Please help me in this sort. thanks

randstraw commented 8 years ago

@umarmughal824 Did you get this issue sorted out?

umarmughal824 commented 8 years ago

not yet. Still finding ways to sort out. Any help will be appreciated.

randstraw commented 8 years ago

I reviewed the URL you provided.

The PayPal payment needs to be executed, that would be happening in this line.

//Execute the payment $result = $payment->execute($execution, $this->_api_context);

Are you getting an error here?

umarmughal824 commented 8 years ago

i did not checked that line by now. Let me try to check it out. By the way, thanks for your help. Just stay here and let me test. I update you in 10 minutes.

umarmughal824 commented 8 years ago

Can you please tell me about the //Execute the payment $result = $payment->execute($execution, $this->_api_context); what is this $execution variable?

umarmughal824 commented 8 years ago

I got the $execute word there.

umarmughal824 commented 8 years ago

I tested it. It redirect to successful transaction page. So its also own transaction this thing. HTTP Status URL PayPal Debug ID Transaction Date tick mark /v1/payments/payment 61691c7211929 19 Jan 2016 08:19:00 tick mark /v1/payments/payment 633317d3930c9 19 Jan 2016 08:18:32 tick mark /v1/payments/payment ca02d82d3029 19 Jan 2016 06:14:02 tick mark /v1/payments/payment 80d0b41d92dc3 19 Jan 2016 05:22:17 tick mark /v1/payments/payment 2623d15524e70 19 Jan 2016 05:13:11 tick mark /v1/payments/payment f90d1dc8725fb 19 Jan 2016 05:12:59 tick mark /v1/payments/payment 3c5aed4f17b85 19 Jan 2016 05:05:51 tick mark /v1/payments/payment c45e9db3a32fc 19 Jan 2016 05:04:06 tick mark /v1/payments/payment 529918d76a23b 19 Jan 2016 05:03:25 tick mark /v1/payments/payment 4a6a24dd809a 19 Jan 2016 05:03:16

umarmughal824 commented 8 years ago

thanks my issue is resolved. After creating the payment. you need to execute the payment by the payment Id which will be returned by the payment creation. thanks @pp-randy . thanks for your help.

randstraw commented 8 years ago

@umarmughal824 I am glad you figured it out. Let me know if you have any other questions I will be happy to help.

umarmughal824 commented 8 years ago

thanks a lot. One more question, By giving paypal as paymentMethod. Will I be able to send payment through credit or debit card? Will it be accpted by the paypal?

randstraw commented 8 years ago

@umarmughal824 that depends. In general a buyer has the option to use a credit or debit card when using the PayPal method (if its available for the buyer to use a credit card); however, to ensure a credit card payment you would want to use the credit card payment method.

umarmughal824 commented 8 years ago

thanks