Beruflich Dokumente
Kultur Dokumente
(//www.scriptcase.net/)
Home (//www.scriptcase.net/tutorials/esp/)
/ Programación (https://www.scriptcase.net/tutorials/category/programming-es/)
• Campo Customerid
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 2 of 7
(//www.scriptcase.net/)
• Funcion call_pagseguro
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 3 of 7
$payment->setSender()->setName($senderName);
$payment->setSender()->setEmail($senderEmail);
$payment->setSender()->setPhone()->withParameters( 11, 56273440 );
$payment->setSender()->setDocument()->withParameters( ‘CPF’,
‘94505764249’ );
$sItems = “SELECT products.productname, order_details.quantity,
order_details.unitpriceFROM order_details INNER JOIN products ON
order_details.productid = products.productidWHERE orderid = “.{orderid};sc_select
(dsitems, $sItems); $pos_item = 1;if ({dsitems} === false){ echo {dsitems_erro};}else
{ while (!{dsitems}->EOF){ $payment->addItems()->withParameters( str_pad
($pos_item, 4, “0”, STR_PAD_LEFT), {dsitems}->fields[0], {dsitems}->fields[1], {dsitems}
->fields[2] ); $pos_item++; {dsitems}->MoveNext(); } {dsitems}->Close();}
$payment->setCurrency(“BRL”);
$payment->setExtraAmount(0.00);
$payment->setReference({orderid});
$payment->setRedirectUrl($redirectUrl);
$payment->setNotificationUrl($notificationUrl);
$payment->addPaymentMethod()->withParameters
( PagSeguro\Enum\PaymentMethod\Group::CREDIT_CARD,
PagSeguro\Enum\PaymentMethod\Config\Keys::MAX_INSTALLMENTS_NO_INTEREST, 2);
$payment->addPaymentMethod()->withParameters
( PagSeguro\Enum\PaymentMethod\Group::CREDIT_CARD,
PagSeguro\Enum\PaymentMethod\Config\Keys::MAX_INSTALLMENTS_LIMIT, 6);
$payment->acceptPaymentMethod()->groups
( \PagSeguro\Enum\PaymentMethod\Group::CREDIT_CARD,
\PagSeguro\Enum\PaymentMethod\Group::BALANCE);
$payment->acceptPaymentMethod()->name
(\PagSeguro\Enum\PaymentMethod\Name::DEBITO_ITAU);
$payment->excludePaymentMethod()->group
(\PagSeguro\Enum\PaymentMethod\Group::BOLETO);
try { $response = $payment->register(
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 4 of 7
• Funcion call_Paypal
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 5 of 7
(//www.scriptcase.net/)
7- Ejecutamos la aplicación
• PagSeguro
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 6 of 7
(https://www.facebook.com/sharer/sharer.php? Facebook
(https://plus.google.com/share? Google+
(https://www.linkedin.com/shareArticle? Linkedin
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019
Tutorial: Utilizando la API de Paypal y Pagseguro | Tutoriais Scriptcase Page 7 of 7
https://www.scriptcase.net/tutorials/utilizando-la-api-de-paypal-y-pagseguro/ 15-04-2019