<?php
'email' => $PAGSEGURO_EMAIL ,
'token' => $PAGSEGURO_TOKEN ,
'creditCardToken' => $creditCardToken ,
'senderHash' => $senderHash ,
'receiverEmail' => $PAGSEGURO_EMAIL ,
'paymentMode' => 'default' ,
'paymentMethod' => 'creditCard' ,
'currency' => 'BRL' ,
'extraAmount' => '1.00' ,
'itemId1' => '0001' ,
'itemDescription1' => 'PHP Test' ,
'itemAmount1' => $numero ,
'itemQuantity1' => 1 ,
'itemId2' => '0002' ,
'itemDescription2' => 'PHP Test2' ,
'itemAmount2' => $numero ,
'itemQuantity2' => 1
) ;
for ( $i = 0 ; $i < count ( $filter ) ; $i ++ ) {
$result [ 'itemId' . ( $i + 1 ) ] = $params [ 'itemId' . ( $i + 1 ) ] ;
$result [ 'itemDescription' . ( $i + 1 ) ] = $params [ 'itemDescription' . ( $i + 1 ) ] ;
$result [ 'itemAmount' . ( $i + 1 ) ] = $params [ 'itemAmount' . ( $i + 1 ) ] ;
$result [ 'itemQuantity' . ( $i + 1 ) ] = $params [ 'itemQuantity' . ( $i + 1 ) ] ;
}
PD9waHAKCiAgICAkcGFyYW1zID0gYXJyYXkoCiAgICAgICAgICAgICAgICAnZW1haWwnICAgICAgICAgICAgICAgICAgICAgPT4gJFBBR1NFR1VST19FTUFJTCwgIAogICAgICAgICAgICAgICAgJ3Rva2VuJyAgICAgICAgICAgICAgICAgICAgID0+ICRQQUdTRUdVUk9fVE9LRU4sCiAgICAgICAgICAgICAgICAnY3JlZGl0Q2FyZFRva2VuJyAgICAgICAgICAgPT4gJGNyZWRpdENhcmRUb2tlbiwKICAgICAgICAgICAgICAgICdzZW5kZXJIYXNoJyAgICAgICAgICAgICAgICA9PiAkc2VuZGVySGFzaCwKICAgICAgICAgICAgICAgICdyZWNlaXZlckVtYWlsJyAgICAgICAgICAgICA9PiAkUEFHU0VHVVJPX0VNQUlMLAogICAgICAgICAgICAgICAgJ3BheW1lbnRNb2RlJyAgICAgICAgICAgICAgID0+ICdkZWZhdWx0JywgCiAgICAgICAgICAgICAgICAncGF5bWVudE1ldGhvZCcgICAgICAgICAgICAgPT4gJ2NyZWRpdENhcmQnLCAKICAgICAgICAgICAgICAgICdjdXJyZW5jeScgICAgICAgICAgICAgICAgICA9PiAnQlJMJywKICAgICAgICAgICAgICAgICdleHRyYUFtb3VudCcgICAgICAgICAgICAgICA9PiAnMS4wMCcsCgogICAgICAgICAgICAgICAgJ2l0ZW1JZDEnICAgICAgICAgICAgICAgICAgID0+ICcwMDAxJywKICAgICAgICAgICAgICAgICdpdGVtRGVzY3JpcHRpb24xJyAgICAgICAgICA9PiAnUEhQIFRlc3QnLCAgCiAgICAgICAgICAgICAgICAnaXRlbUFtb3VudDEnICAgICAgICAgICAgICAgPT4gJG51bWVybywgIAogICAgICAgICAgICAgICAgJ2l0ZW1RdWFudGl0eTEnICAgICAgICAgICAgID0+IDEsCgogICAgICAgICAgICAgICAgJ2l0ZW1JZDInICAgICAgICAgICAgICAgICAgID0+ICcwMDAyJywKICAgICAgICAgICAgICAgICdpdGVtRGVzY3JpcHRpb24yJyAgICAgICAgICA9PiAnUEhQIFRlc3QyJywgIAogICAgICAgICAgICAgICAgJ2l0ZW1BbW91bnQyJyAgICAgICAgICAgICAgID0+ICRudW1lcm8sICAKICAgICAgICAgICAgICAgICdpdGVtUXVhbnRpdHkyJyAgICAgICAgICAgICA9PiAxCiAgICApOwoKICAgICRmaWx0ZXIgPSBwcmVnX2dyZXAoJy9eaXRlbUlkKFswLTldezEsfSkvJywgYXJyYXlfa2V5cyggJHBhcmFtcyApKTsKICAgICRyZXN1bHQgPSBhcnJheSgpOwogICAgZm9yKCRpID0gMDsgJGkgPCBjb3VudCgkZmlsdGVyKTsgJGkrKykKICAgIHsKCiAgICAgICAgJHJlc3VsdFsnaXRlbUlkJyAuICgkaSArIDEpXSA9ICRwYXJhbXNbJ2l0ZW1JZCcgLiAoJGkgKyAxKV07CiAgICAgICAgJHJlc3VsdFsnaXRlbURlc2NyaXB0aW9uJyAuICgkaSArIDEpXSA9ICRwYXJhbXNbJ2l0ZW1EZXNjcmlwdGlvbicgLiAoJGkgKyAxKV07CiAgICAgICAgJHJlc3VsdFsnaXRlbUFtb3VudCcgLiAoJGkgKyAxKV0gPSAkcGFyYW1zWydpdGVtQW1vdW50JyAuICgkaSArIDEpXTsKICAgICAgICAkcmVzdWx0WydpdGVtUXVhbnRpdHknIC4gKCRpICsgMSldID0gJHBhcmFtc1snaXRlbVF1YW50aXR5JyAuICgkaSArIDEpXTsKCiAgICB9CgogICAgdmFyX2R1bXAoJHJlc3VsdCk7