You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
drewjoh edited this page Apr 13, 2011
·
1 revision
Example: Charge a person based on a past PayPal transaction that has occurred.
You may need special permission from PayPal to use this method.
$paypal = newPaypal();
// Setup PayPal information$paypal->payment_type = 'Sale';
$paypal->first_name = 'First Name';
$paypal->last_name = 'Last Name';
$paypal->amount_total = '42.00';
// A Transaction ID of a past payment the user has made$paypal->reference_id = $last_paypal_transaction_id;
// Do the Reference Transaction (will be processed similar to a Direct Payment)$paypal->do_reference_transaction();
NOTE: PayPal states that you can do a Reference Transaction based on a previous transaction for up to a year after the previous transaction occurred. However, PayPal does not guarantee this to work for any transaction older than 7 - 30 days.*
See PayPal documentation for optional values for payment_type.